import request from '@/router/axios';

// 获取流失客户列表
export function lossList(query) {
    return request({
        url: '/cp/contactloss/query',
        method: 'get',
        params: query
    });
}

// 获取未交流客户列表
export function contactList(query) {
    return request({
        url: '/cp/contactloss/page',
        method: 'get',
        params: query
    });
}
// 获取成员列表
export function workdepartment() {
    return request({
        url: '/cp/workdepartment/index',
        method: 'get'
    });
}

//成员的未提醒客户
export function remindEmployee(obj) {
    return request({
        url: '/cp/contactloss/choose',
        method: 'post',
        data: obj
    });
}
//给成员发提醒消息
export function remindToEmployee(obj) {
    return request({
        url: '/cp/contactloss/msg',
        method: 'post',
        data: obj
    });
}
//查询聊天记录
export function queryChatRecords(query) {
    return request({
        url: '/cp/contactloss/user',
        method: 'get',
        params: query
    });
}
//客户未交流客户数
export function noChatCustomer(query) {
    return request({
        url: '/cp/contactloss/count',
        method: 'get',
        params: query
    });
}
//客户未交流客户总计数
export function getLossInfo(query) {
    return request({
        url: `/cp/contactloss/loss-statistics/${query.deptId}`,
        method: 'get'
    });
}
//-客户流失统计分页查询
export function getLossList(query) {
    return request({
        url: `/cp/contactloss/loss-statistics-page/${query.deptId}`,
        method: 'get',
        params: query
    });
}
//客户未交流客户趋势图
export function getLossStatistics(query) {
    return request({
        url: '/cp/contactloss/loss-tendency',
        method: 'get',
        params: query
    });
}
//-客户未交流基础信息统计
export function getNoChatInfo(deptId) {
    return request({
        url: `/cp/contactloss/nocommunication-statistics/${deptId}`,
        method: 'get'
    });
}
//-客户未交流统计分页查询
export function getNoChatPage(query) {
    return request({
        url: `/cp/contactloss/nocommunication-statistics-page/${query.deptId}`,
        method: 'get',
        params: query
    });
}
// 根据deptId获取objectList(下一级机构list/当前机构下成员list)
export function getOptions(deptId) {
    return request({
        url: `/cp/contactloss/obj-list/${deptId}`,
        method: 'get'
    });
}
//客户未交流趋势图
export function getNoChatStatistics(query) {
    return request({
        url: '/cp/contactloss/nocommunication-tendency',
        method: 'get',
        params: query
    });
}

// 当前机构下list
export function getObjList(query) {
    return request({
        url: '/cp/contactloss/obj-list',
        method: 'get',
        params: query
    });
}
